<?php

/**
 * DatosFacturacion form base class.
 *
 * @method DatosFacturacion getObject() Returns the current form's model object
 *
 * @package    SAC_CLonsa
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseDatosFacturacionForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                  => new sfWidgetFormInputHidden(),
      'nombre_organizacion' => new sfWidgetFormInputText(),
      'rut'                 => new sfWidgetFormInputText(),
      'giro'                => new sfWidgetFormInputText(),
      'direccion'           => new sfWidgetFormInputText(),
      'telefono'            => new sfWidgetFormInputText(),
      'fax'                 => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id'                  => new sfValidatorPropelChoice(array('model' => 'DatosFacturacion', 'column' => 'id', 'required' => false)),
      'nombre_organizacion' => new sfValidatorString(array('max_length' => 45)),
      'rut'                 => new sfValidatorString(array('max_length' => 14)),
      'giro'                => new sfValidatorString(array('max_length' => 45)),
      'direccion'           => new sfValidatorString(array('max_length' => 45)),
      'telefono'            => new sfValidatorString(array('max_length' => 45)),
      'fax'                 => new sfValidatorString(array('max_length' => 45, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('datos_facturacion[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'DatosFacturacion';
  }


}
